import {API_CONFIG} from "../config/index.js";
import request from "./index.js";

// 集群
export const  getClusterListHandler = ()=>{
    console.log("查看集群列表")
    return request(API_CONFIG.getClusterListApi,{},"GET",2000)
}

export const  getClusterHandler = (id)=>{
    console.log("查看集群详情:",id)
    return request(API_CONFIG.getClusterApi,{id},"GET",2000)
}

export const  deleteClusterHandler = (id)=>{
    console.log("删除集群:",id)
    return request(API_CONFIG.deleteClusterApi,{id},"GET",2000)
}

export const  addClusterHandler = (data)=>{
    console.log("添加集群:",data)
    return request(API_CONFIG.addClusterApi,data,"POST",2000)
}

export const  updateClusterHandler = (data)=>{
    console.log("更新集群:",data)
    return request(API_CONFIG.updateClusterApi,data,"POST",2000)
}

// // 节点
// export const  getNodeListHandler = (clusterId)=>{
//     console.log("查看节点列表")
//     return request(API_CONFIG.getNodeListApi,{clusterId},"GET",2000)
// }